import { RouteRecordRaw } from 'vue-router';
import CimupLayout from '@/layout/cimup.vue';

const routes: RouteRecordRaw = {
  path: '/editor/:id',
  name: 'editor',
  meta: {
    path: '/editor',
    title: '场景生成',
    layout: CimupLayout,
    hidden: true,
  },
  component: () => import('@/views/editor/index.vue'),
  children: [
    {
      path: 'stage',
      name: 'editorStage',
      meta: {
        path: '/editor/stage',
        title: '场景',
      },
      component: () => import('@/views/editor/stage/index.vue'),
    },
    {
      path: 'panel',
      name: 'editorPanel',
      meta: {
        path: '/editor/panel',
        title: '面板',
      },
      component: () => import('@/views/editor/panel/index.vue'),
    },
    {
      path: 'event',
      name: 'editorEvent',
      meta: {
        path: '/editor/event',
        title: '蓝图',
      },
      component: () => import('@/views/editor/event/index.vue'),
    },
  ],
};

export default routes;
